I'm using socket.io-client in my React js web app. It compiles without error, but when I try to open the development server (localhost:3000) I get the following error:
In this project where the error is being thrown, here is a list of the relevant packages and their versions:
Webpack Version: 4.44.2
Threads like this one suggest that this is some sort of issue with mixing import and module.exports in ES6, but I definitely don't want to modify the socket.io-client module.
In a previous React project, where the module works, here is a list of the relevant packages and their versions:
Webpack Version: 4.42.0
I've played around a little bit with different versions of socket.io-client and react to try to get it working, but to no avail...
Webpack uses ES syntax, so commonJS syntax will not work.
export default lookup